<template>
	<view class="content">
		<view>
			<swiper>
				<block v-for="item in arrs" :key="item.id">
					<swiper-item>
						<view>
							<image :src="item.src"></image>
						</view>
					</swiper-item>
				</block>
			</swiper>
		</view>
		<!-- 页面跳转 -->
		<navigator url="/pages/lists/lists?name=zhang">跳转到列表页面</navigator>
	</view>
</template>

<script>
	import axios from "axios"
	export default {
		data() {
			return {
				title: 'Hello',
				arrs:[
					{
						id:0,
						src:"https://puui.qpic.cn/tv/0/1244304824_1080607/0?max_age=7776000"
					},
					{
						id:1,
						src:"https://puui.qpic.cn/tv/0/1244049833_1080607/0?max_age=7776000"
					},
					{
						id:2,
						src:"https://puui.qpic.cn/tv/0/1244332002_1080607/0?max_age=7776000"
					},
					{
						id:3,
						src:"https://puui.qpic.cn/tv/0/1244269541_1080607/0?max_age=7776000"
					}
				]
			}
		},
		onLoad() {

		},
		methods: {

		},
		created(){
			//#ifdef H5
			axios.get("/api").then(res=>console.log(res))
			//#endif
			//#ifdef MP-WEIXIN
			wx.request({
				url:"http://127.0.0.1:2000/",
				success(res){
					console.log(res)
				}
			})
			//#endif
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	
	.content>view{
		width:300px;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
